fn main() {
    let mut v = vec![1, 2, 3];
    println!("{:?}", v);

    v.push(4);

    match v.get(100) {
        Some(number) => {
            println!("value is {}", number)
        }
        _ => {
            println!("value is null")
        }
    }

    match v.get(100) {
        Some(3) => {
            println!("value is 3")
        }
        _ => {
            println!("value is not 3")
        }
    }

    if let Some(3) = v.get(100) {
        println!("value is 3")
    } else {
        println!("value is not 3")
    }

    let num1 = if v.get(1).take() == Some(&3) {
        1u8
    } else {
        2u8
    };

    println!("{}", num1)
}
